# 控制滚动条
from selenium import webdriver
import time
driver = webdriver.Chrome()
driver.get("https://www.baidu.com/")
driver.maximize_window()
driver.find_element_by_id("kw").send_keys("你的名字")
driver.find_element_by_id("su").click()
time.sleep(2)
js1 = "var q=document.documentElement.scrollTop=10000"
driver.execute_script(js1)
time.sleep(3)
js2 = "var q=document.documentElement.scrollTop=0"
driver.execute_script(js2)
time.sleep(3)
driver.quit()
